<template>
    <div class="adderss-box">
       <div class="content" style="font-size:14px" v-html="content">

       </div>
    </div>
</template>
<script>
import {getBondFee,getLawSay,} from '@/api/public'
export default {
    name:'LegalNotice',
    data (){
        return{
          content:'',//用户协议内容
        }
    },
    //实例创建完成后被立即调用
    created (){
        //获得语言类型lang
        if(this.$route.query.lang) {
            this.lang = this.$route.query.lang;
            //获得法律声明
            this.getLawSay();
        }
        //获取用户id
        if(this.$route.query.userId && this.$route.query.userId > 0){
            this.userId = this.$route.query.userId;
             //把用户id存储在缓存
             window.localStorage.setItem("userId",this.userId);
        }else{
            this.userId = window.localStorage.getItem("userId");
        }
    },
    //
    methods:{
        //获得法律声明
        getLawSay(){
             getLawSay(this.lang).then(res => {
                // console.log(res);
                if(res.code == 200){
                   this.content = res.data;
                }else{
                    toast(res.msg);
                }
            });
        },
    }
    
}
</script>

<style lang="stylus" scoped>
.adderss-box{
    background :#fff;
    padding:10px;
    min-height: 100%;
    margin-bottom :.8rem;
    .content{
        line-height:.64rem;
        color:#666;
    }
}
</style>


